﻿namespace FluentMvc
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;

    internal class PropertySetting<TModel>
    {
        public PropertySetting()
        {
            RemoteValidators = new List<RemoteValidationSettings>();
            ValidationSettings = new List<ValidationSetting<TModel>>();
            AdditionalMetadata = new Dictionary<string, object>();
        }

        public List<RemoteValidationSettings> RemoteValidators { get; set; }
        public List<ValidationSetting<TModel>> ValidationSettings { get; set; }

        public string Display { get; set; }
        public bool? HiddenInput { get; set; }
        public bool? HiddenInputDispayValue { get; set; }
        public DataType? DataType { get; set; }
        public string UIHint { get; set; }
        public Dictionary<string,object> AdditionalMetadata { get; set; }
        public string DisplayFormat { get; set; }
        public string EditorFormat { get; set; }
        public string NullText { get; set; }
        public bool? ShowForEdit { get; set; }
        public bool? ShowForDisplay { get; set; }
        public int? Order { get; set; }
        public string Watermark { get; set; }

        public Action<FluentValidationContext> BeforeValidate { get; set; }
        public Action<AfterValidateArgs> AfterValidate { get; set; }
    }
}